/*
 * @Description: 资源信息描述
 * @Author: iamsmiling
 * @Date: 2021-06-06 12:11:08
 * @LastEditTime: 2021-06-06 16:34:52
 */

import 'package:credit_business_circle/R/R.dart';
import 'package:flutter/material.dart';

class SoureceDescriptionFormCard extends StatelessWidget {
  const SoureceDescriptionFormCard({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Container(
      margin: EdgeInsets.all(R.dimen.dp10),
      padding: EdgeInsets.symmetric(
          vertical: R.dimen.dp20, horizontal: R.dimen.dp10),
      decoration: BoxDecoration(
          color: R.color.ffffffff,
          borderRadius: BorderRadius.circular(R.dimen.sp5)),
      child: Column(
        crossAxisAlignment: CrossAxisAlignment.start,
        children: [
          Row(
            mainAxisAlignment: MainAxisAlignment.spaceBetween,
            children: [
              Text.rich(TextSpan(
                  text: "资源图片（选填）\n",
                  children: [
                    TextSpan(
                        text: "最多6张",
                        style: TextStyle(
                            fontSize: R.dimen.sp11, color: R.color.ff999999))
                  ],
                  style: TextStyle(
                      fontSize: R.dimen.sp13, color: R.color.ff333333))),
              GestureDetector(
                child: Container(
                    padding: EdgeInsets.only(
                        top: R.dimen.dp10,
                        left: R.dimen.dp8,
                        right: R.dimen.dp8,
                        bottom: R.dimen.dp7),
                    decoration: BoxDecoration(
                        borderRadius: BorderRadius.circular(R.dimen.sp5),
                        border: Border.all(color: R.color.ffcccccc)),
                    child: Column(
                      children: [
                        Image.asset(R.image.camera),
                        Container(
                          margin: EdgeInsets.only(top: R.dimen.dp10),
                          child: Text(
                            "添加照片",
                            style: TextStyle(
                                color: R.color.ffaaaaaa,
                                fontSize: R.dimen.sp11),
                          ),
                        )
                      ],
                    )),
              )
            ],
          ),
          Container(
            margin: EdgeInsets.symmetric(vertical: R.dimen.dp16),
            child: Divider(),
          ),
          Text("其它说明（选填）"),
          Container(
            margin: EdgeInsets.only(top: R.dimen.dp10),
            padding: EdgeInsets.all(R.dimen.dp5),
            decoration:
                BoxDecoration(border: Border.all(color: R.color.ffcccccc)),
            child: TextFormField(
              maxLines: 3,
              decoration: InputDecoration(hintText: "如以上选项无法完整表达你的需求，请于此补充说明"),
            ),
          )
        ],
      ),
    );
  }
}
